package com.fhz.core_lib.utils;

import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.view.View;
import android.view.animation.LinearInterpolator;

/**
 * 时间:11/15/21
 *
 * @author msfeng
 * 简述: 动画封装
 */
public class AnimUtils {

    public static ObjectAnimator rotation(View view){
        ObjectAnimator animator = ObjectAnimator.ofFloat(view, "rotation", 0, 360);
        animator.setDuration(2000);
        animator.setRepeatMode(ValueAnimator.RESTART);
        animator.setInterpolator(new LinearInterpolator());
        return animator;
    }
}
